import Vue from "vue";
import VueRouter from "vue-router";
import Home from "../views/Home.vue";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/home",
  },
  {
    path: "/my",
    name: "my",
    component: () => import("../views/My.vue"),
  },
  {
    path: "/show",
    name: "show",
    component: () => import("../views/show/Index.vue"),
    children: [
      {
        path: "/showhome",
        name: "showhome",
        component: () => import("../views/show/Home.vue"),
      },
      {
        path: "/showorder",
        name: "showorder",
        component: () => import("../views/show/Order.vue"),
      },
    ],
  },
  {
    path: "/index",
    name: "index",
    component: () => import("../views/Index.vue"),
    children: [
      {
        path: "/radio",
        name: "radio",
        component: () => import("../views/Radio.vue"),
      },
      {
        path: "/sradio",
        name: "sradio",
        component: () => import("../views/Sradio.vue"),
      },
      {
        path: "/home",
        name: "home",
        component: () => import("../views/Home.vue"),
      },
    ],
  },
];

const router = new VueRouter({
  routes,
});

export default router;
